package com.example.questionnaire.pojo.DO;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;


@Data
@ApiModel("所有问卷类")
public class AllQuestion {

    @TableId(type = IdType.UUID)
    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("问卷id")
    private String formid;

    @ApiModelProperty("题型")
    private int questionType;

    @ApiModelProperty("题号")
    private String subjectId;

    public AllQuestion() {
    }

    @ApiModelProperty("题目")
    private String title;

    @ApiModelProperty("题目顺序")
    private int subjectNum;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)//在插入的时候自动填充
    private Date createTime;

    @ApiModelProperty("最后更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)////在插入和更新的时候自动填充
    private Date modifiedTime;
    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer deleted;

    public AllQuestion(String formid, int questionType, String subjectId, String title, int subjectNum) {
        this.formid = formid;
        this.questionType = questionType;
        this.subjectId = subjectId;
        this.title = title;
        this.subjectNum = subjectNum;
    }
}
